package com.huluobo.a2206monthdemo.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2206monthdemo.R;
import com.huluobo.a2206monthdemo.live.MessageEntity;

/**
 * Created by LC on 2024/9/6.
 */
public class MessageAdapter extends BaseQuickAdapter<MessageEntity, BaseViewHolder> {
    public MessageAdapter() {
        super(R.layout.item_chat_room);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, MessageEntity messageEntity) {
        String username = messageEntity.getUsername();
        String content = messageEntity.getContent();
        baseViewHolder.setText(R.id.item_chat_room_tv, username + ":" + content);
    }
}
